﻿@{
    
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@if (ViewBag.UserProfile != null)
{
    <h2>@ViewBag.UserProfile.UserName's Profile:</h2>
    @Html.Partial("_UserProfile", (Google.GData.YouTube.ProfileEntry)ViewBag.UserProfile)

    
if (ViewBag.Favorites != null)
{
    <h2>@ViewBag.UserProfile.UserName's Favorites:</h2>
    @Html.Partial("_Related", (Google.GData.Client.Feed<Google.YouTube.Video>)ViewBag.Favorites)    
}

if (ViewBag.UserUploads != null)
{
    <h2>@ViewBag.UserProfile.UserName's Uploads:</h2>
    @Html.Partial("_Related", (Google.GData.Client.Feed<Google.YouTube.Video>)ViewBag.UserUploads)    
}
}
@model Google.GData.Client.Feed<Google.YouTube.Playlist>
@if (Model.Entries != null && Model.Entries.Count() > 0)
{
    <h2>
        Playlists:</h2>
    <ul>
        @foreach (var item in Model.Entries)
        {
            if (item.Title != string.Empty)
            {
                <li>                
                @Html.ActionLink(item.Title, "SpecialVideoList", new { id = item.Id.Split(':')[5] })
                </li>    
            }

        }
    </ul>               
}
@if (ViewBag.UserSubscriptions != null)
{
    Html.Partial("_Subscriptions", (Google.GData.Client.Feed<Google.YouTube.Subscription>)ViewBag.UserSubscriptions);
}
